

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>llc - LLVM static compiler &mdash; LLVM 3.2 documentation</title>
    
    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '3.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="LLVM 3.2 documentation" href="../index.html" />
    <link rel="up" title="LLVM Command Guide" href="index.html" />
    <link rel="next" title="lli - directly execute programs from LLVM bitcode" href="lli.html" />
    <link rel="prev" title="opt - LLVM optimizer" href="opt.html" />
<style type="text/css">
  table.right { float: right; margin-left: 20px; }
  table.right td { border: 1px solid #ccc; }
</style>

  </head>
  <body>
<div class="logo">
  <a href="../index.html">
    <img src="../_static/logo.png"
         alt="LLVM Logo" width="250" height="88"/></a>
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="lli.html" title="lli - directly execute programs from LLVM bitcode"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="opt.html" title="opt - LLVM optimizer"
             accesskey="P">previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="../index.html">Documentation</a>&raquo;</li>

          <li><a href="../userguides.html" >User Guides</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">LLVM Command Guide</a> &raquo;</li> 
      </ul>
    </div>

      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">llc - LLVM static compiler</a><ul>
<li><a class="reference internal" href="#synopsis">SYNOPSIS</a></li>
<li><a class="reference internal" href="#description">DESCRIPTION</a></li>
<li><a class="reference internal" href="#options">OPTIONS</a><ul>
<li><a class="reference internal" href="#end-user-options">End-user Options</a></li>
<li><a class="reference internal" href="#tuning-configuration-options">Tuning/Configuration Options</a></li>
<li><a class="reference internal" href="#intel-ia-32-specific-options">Intel IA-32-specific Options</a></li>
</ul>
</li>
<li><a class="reference internal" href="#exit-status">EXIT STATUS</a></li>
<li><a class="reference internal" href="#see-also">SEE ALSO</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="opt.html"
                        title="previous chapter">opt - LLVM optimizer</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="lli.html"
                        title="next chapter">lli - directly execute programs from LLVM bitcode</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/CommandGuide/llc.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="llc-llvm-static-compiler">
<h1>llc - LLVM static compiler<a class="headerlink" href="#llc-llvm-static-compiler" title="Permalink to this headline">¶</a></h1>
<div class="section" id="synopsis">
<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<p><strong>llc</strong> [<em>options</em>] [<em>filename</em>]</p>
</div>
<div class="section" id="description">
<h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>The <strong>llc</strong> command compiles LLVM source inputs into assembly language for a
specified architecture.  The assembly language output can then be passed through
a native assembler and linker to generate a native executable.</p>
<p>The choice of architecture for the output assembly code is automatically
determined from the input file, unless the <strong>-march</strong> option is used to override
the default.</p>
</div>
<div class="section" id="options">
<h2>OPTIONS<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
<p>If <em>filename</em> is - or omitted, <strong>llc</strong> reads from standard input.  Otherwise, it
will from <em>filename</em>.  Inputs can be in either the LLVM assembly language
format (.ll) or the LLVM bitcode format (.bc).</p>
<p>If the <strong>-o</strong> option is omitted, then <strong>llc</strong> will send its output to standard
output if the input is from standard input.  If the <strong>-o</strong> option specifies -,
then the output will also be sent to standard output.</p>
<p>If no <strong>-o</strong> option is specified and an input file other than - is specified,
then <strong>llc</strong> creates the output filename by taking the input filename,
removing any existing <em>.bc</em> extension, and adding a <em>.s</em> suffix.</p>
<p>Other <strong>llc</strong> options are as follows:</p>
<div class="section" id="end-user-options">
<h3>End-user Options<a class="headerlink" href="#end-user-options" title="Permalink to this headline">¶</a></h3>
<p><strong>-help</strong></p>
<blockquote>
<div>Print a summary of command line options.</div></blockquote>
<p><strong>-O</strong>=<em>uint</em></p>
<blockquote>
<div>Generate code at different optimization levels. These correspond to the <em>-O0</em>,
<em>-O1</em>, <em>-O2</em>, and <em>-O3</em> optimization levels used by <strong>llvm-gcc</strong> and
<strong>clang</strong>.</div></blockquote>
<p><strong>-mtriple</strong>=<em>target triple</em></p>
<blockquote>
<div>Override the target triple specified in the input file with the specified
string.</div></blockquote>
<p><strong>-march</strong>=<em>arch</em></p>
<blockquote>
<div>Specify the architecture for which to generate assembly, overriding the target
encoded in the input file.  See the output of <strong>llc -help</strong> for a list of
valid architectures.  By default this is inferred from the target triple or
autodetected to the current architecture.</div></blockquote>
<p><strong>-mcpu</strong>=<em>cpuname</em></p>
<blockquote>
<div>Specify a specific chip in the current architecture to generate code for.
By default this is inferred from the target triple and autodetected to
the current architecture.  For a list of available CPUs, use:
<strong>llvm-as &lt; /dev/null | llc -march=xyz -mcpu=help</strong></div></blockquote>
<p><strong>-mattr</strong>=<em>a1,+a2,-a3,...</em></p>
<blockquote>
<div>Override or control specific attributes of the target, such as whether SIMD
operations are enabled or not.  The default set of attributes is set by the
current CPU.  For a list of available attributes, use:
<strong>llvm-as &lt; /dev/null | llc -march=xyz -mattr=help</strong></div></blockquote>
<p><strong>&#8211;disable-fp-elim</strong></p>
<blockquote>
<div>Disable frame pointer elimination optimization.</div></blockquote>
<p><strong>&#8211;disable-excess-fp-precision</strong></p>
<blockquote>
<div>Disable optimizations that may produce excess precision for floating point.
Note that this option can dramatically slow down code on some systems
(e.g. X86).</div></blockquote>
<p><strong>&#8211;enable-no-infs-fp-math</strong></p>
<blockquote>
<div>Enable optimizations that assume no Inf values.</div></blockquote>
<p><strong>&#8211;enable-no-nans-fp-math</strong></p>
<blockquote>
<div>Enable optimizations that assume no NAN values.</div></blockquote>
<p><strong>&#8211;enable-unsafe-fp-math</strong></p>
<blockquote>
<div>Enable optimizations that make unsafe assumptions about IEEE math (e.g. that
addition is associative) or may not work for all input ranges.  These
optimizations allow the code generator to make use of some instructions which
would otherwise not be usable (such as fsin on X86).</div></blockquote>
<p><strong>&#8211;enable-correct-eh-support</strong></p>
<blockquote>
<div>Instruct the <strong>lowerinvoke</strong> pass to insert code for correct exception handling
support.  This is expensive and is by default omitted for efficiency.</div></blockquote>
<p><strong>&#8211;stats</strong></p>
<blockquote>
<div>Print statistics recorded by code-generation passes.</div></blockquote>
<p><strong>&#8211;time-passes</strong></p>
<blockquote>
<div>Record the amount of time needed for each pass and print a report to standard
error.</div></blockquote>
<p><strong>&#8211;load</strong>=<em>dso_path</em></p>
<blockquote>
<div>Dynamically load <em>dso_path</em> (a path to a dynamically shared object) that
implements an LLVM target. This will permit the target name to be used with the
<strong>-march</strong> option so that code can be generated for that target.</div></blockquote>
</div>
<div class="section" id="tuning-configuration-options">
<h3>Tuning/Configuration Options<a class="headerlink" href="#tuning-configuration-options" title="Permalink to this headline">¶</a></h3>
<p><strong>&#8211;print-machineinstrs</strong></p>
<blockquote>
<div>Print generated machine code between compilation phases (useful for debugging).</div></blockquote>
<p><strong>&#8211;regalloc</strong>=<em>allocator</em></p>
<blockquote>
<div><p>Specify the register allocator to use. The default <em>allocator</em> is <em>local</em>.
Valid register allocators are:</p>
<p><em>simple</em></p>
<blockquote>
<div>Very simple &#8220;always spill&#8221; register allocator</div></blockquote>
<p><em>local</em></p>
<blockquote>
<div>Local register allocator</div></blockquote>
<p><em>linearscan</em></p>
<blockquote>
<div>Linear scan global register allocator</div></blockquote>
<p><em>iterativescan</em></p>
<blockquote>
<div>Iterative scan global register allocator</div></blockquote>
</div></blockquote>
<p><strong>&#8211;spiller</strong>=<em>spiller</em></p>
<blockquote>
<div><p>Specify the spiller to use for register allocators that support it.  Currently
this option is used only by the linear scan register allocator. The default
<em>spiller</em> is <em>local</em>.  Valid spillers are:</p>
<p><em>simple</em></p>
<blockquote>
<div>Simple spiller</div></blockquote>
<p><em>local</em></p>
<blockquote>
<div>Local spiller</div></blockquote>
</div></blockquote>
</div>
<div class="section" id="intel-ia-32-specific-options">
<h3>Intel IA-32-specific Options<a class="headerlink" href="#intel-ia-32-specific-options" title="Permalink to this headline">¶</a></h3>
<p><strong>&#8211;x86-asm-syntax=att|intel</strong></p>
<blockquote>
<div>Specify whether to emit assembly code in AT&amp;T syntax (the default) or intel
syntax.</div></blockquote>
</div>
</div>
<div class="section" id="exit-status">
<h2>EXIT STATUS<a class="headerlink" href="#exit-status" title="Permalink to this headline">¶</a></h2>
<p>If <strong>llc</strong> succeeds, it will exit with 0.  Otherwise, if an error occurs,
it will exit with a non-zero value.</p>
</div>
<div class="section" id="see-also">
<h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<p>lli|lli</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="lli.html" title="lli - directly execute programs from LLVM bitcode"
             >next</a> |</li>
        <li class="right" >
          <a href="opt.html" title="opt - LLVM optimizer"
             >previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="../index.html">Documentation</a>&raquo;</li>

          <li><a href="../userguides.html" >User Guides</a> &raquo;</li>
          <li><a href="index.html" >LLVM Command Guide</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, LLVM Project.
      Last updated on 2012-12-21.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>